home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / Savvy ƒ / IconSuite.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-19  |  4.0 KB  |  103 lines  |  [TEXT/MPS ]

  1. /* @(#) IconSuite.h 6/19/92
  2.     {Sources}Hack:IconSuite.h
  3.  
  4.     No rights reserved
  5.     
  6.     Product:        Joel’s MacHack ’92 entry
  7.     File:            IconSuite.h
  8.     Author:            Joel West, Palomar Software
  9.     Date:            Fri, Jun 19, 1992
  10.     Description:    This represents System 7 Finder icon plotting routines
  11.                     that is documented in Tech Note #306 (May 1992)
  12.                     that should be in an MPW header file, but is not
  13. */
  14.  
  15. #ifndef __ICONSUITE__
  16. #define __ICONSUITE__
  17.  
  18. #include <Types.h>
  19. #include <QuickDraw.h>
  20. #include <Icons.h>
  21.  
  22. enum {
  23.     Large1BitMask        =    'ICN#',
  24.     Large4BitData        =    'icl4',
  25.     Large8BitData        =    'icl8',
  26.     Small1BitMask        =    'ics#',
  27.     Small4BitData        =    'ics4',
  28.     Small8BitData        =    'ics8',
  29.     Mini1BitMask        =    'sicn',
  30.     Mini4BitData        =    'icm4',
  31.     Mini8BitData        =    'icm8'
  32. };
  33.  
  34. enum {
  35.     ttNone                =    0x0,
  36.     ttDisabled            =    0x1,
  37.     ttOffline            =    0x2,
  38.     ttOpen                =    0x3,
  39.     ttSelected            =    0x4000,
  40.     ttSelectedDisabled        =    (0x4000 + 0x1),
  41.     ttSelectedOffline        =    (0x4000 + 0x2),
  42.     ttSelectedOpen        =    (0x4000 + 0x3),
  43.     ttLabel0            =    0x0000,
  44.     ttLabel1            =    0x0100,
  45.     ttLabel2            =    0x0200,
  46.     ttLabel3            =    0x0300,
  47.     ttLabel4            =    0x0400,
  48.     ttLabel5            =    0x0500,
  49.     ttLabel6            =    0x0600,
  50.     ttLabel7            =    0x0700
  51. } IconTransformType;
  52.  
  53. enum {
  54.     atNone                =    0x0,
  55.     atVerticalCenter        =    0x1,
  56.     atTop                =    0x2,
  57.     atBottom            =    0x3,
  58.     atHorizontalCenter        =    0x4,
  59.     atLeft                =    0x8,
  60.     atRight            =    0xC
  61. };
  62.  
  63. pascal OSErr PlotIconID(const Rect *theRect, short align, short  transform, short theResID)
  64.      = {0x303C, 0x0500, 0xABC9};
  65. pascal OSErr NewIconSuite(Handle *theIconSuite) = {0x303C, 0x0207, 0xABC9};
  66. pascal OSErr AddIconToSuite(Handle theIconData,Handle theSuite,ResType theType)= {0x303C, 0x0608, 0xABC9};
  67. pascal OSErr GetIconFromSuite(Handle *theIconData,Handle theSuite,ResType theType)= {0x303C, 0x0609, 0xABC9};
  68. pascal OSErr ForEachIconDo(Handle theSuite,short selector,ProcPtr action,void *yourDataPtr)
  69.     = {0x303C, 0x080A, 0xABC9};
  70. pascal OSErr GetIconSuite(Handle *theIconSuite,short theResID,short selector)= {0x303C, 0x0501, 0xABC9};    
  71. pascal OSErr DisposeIconSuite(Handle theIconSuite,Boolean disposeData)= {0x303C, 0x0302, 0xABC9};
  72. pascal OSErr PlotIconSuite(const Rect *theRect,short align,short transform,Handle theIconSuite)
  73.     = {0x303C, 0x0603, 0xABC9};
  74. pascal OSErr MakeIconCache(Handle *theHandle,ProcPtr makeIcon,void *yourDataPtr)= {0x303C, 0x0604, 0xABC9};
  75. pascal OSErr LoadIconCache(const Rect *theRect,short align,short transform,Handle theIconCache)
  76.     = {0x303C, 0x0606, 0xABC9};
  77. pascal OSErr GetLabel(short labelNumber,RGBColor *labelColor,Str255 labelString)= {0x303c, 0x050B, 0xABC9};
  78. pascal Boolean PtInIconID(Point testPt,Rect *iconRect,short alignment,short iconID)= {0x303c, 0x060D, 0xABC9};
  79. pascal Boolean PtInIconSuite(Point testPt,Rect *iconRect,short alignment,Handle theIconSuite)
  80.     = {0x303c, 0x070E, 0xABC9};
  81. pascal Boolean RectInIconID(Rect *testRect,Rect *iconRect,short alignment,short iconID)
  82.     = {0x303c, 0x0610, 0xABC9};
  83. pascal Boolean RectInIconSuite(Rect *testRect,Rect *iconRect,short alignment,Handle theIconSuite)
  84.     = {0x303c, 0x0711, 0xABC9};
  85. pascal OSErr IconIDToRgn(RgnHandle theRgn,Rect *iconRect,short alignment,short iconID)
  86.     = {0x303c, 0x0613, 0xABC9};
  87. pascal OSErr IconSuiteToRgn(RgnHandle theRgn,Rect *iconRect,short alignment,Handle theIconSuite)
  88.     = {0x303c, 0x0714, 0xABC9};
  89. pascal OSErr SetSuiteLabel(Handle theSuite, short theLabel)= {0x303C, 0x0316, 0xABC9};
  90. pascal short GetSuiteLabel(Handle theSuite)= {0x303C, 0x0217, 0xABC9};    
  91. pascal OSErr GetIconCacheData(Handle theCache, void **theData)= {0x303C, 0x0419, 0xABC9};    
  92. pascal OSErr SetIconCacheData(Handle theCache, void *theData)= {0x303C, 0x041A, 0xABC9};    
  93. pascal OSErr GetIconCacheProc(Handle theCache, ProcPtr *theProc)= {0x303C, 0x041B, 0xABC9};    
  94. pascal OSErr SetIconCacheProc(Handle theCache, ProcPtr theProc)= {0x303C, 0x041C, 0xABC9};
  95. pascal OSErr PlotSICNHandle(const Rect *theRect,short align,short transform,Handle theSICN)
  96.     = {0x303C, 0x061E, 0xABC9};
  97. pascal OSErr PlotCIconHandle(const Rect *theRect,short align,short transform,CIconHandle theCIcon)
  98.     = {0x303C, 0x061F, 0xABC9};
  99. pascal OSErr SetLabel(short labelNumber, const RGBColor *, ConstStr255Param)
  100.     = {0x303C, 0x050C, 0xABC9};
  101.  
  102. #endif __ICONSUITE__
  103.